package org.meb.speedway.model.common;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name = "t_process_log")
@Getter
@Setter
public class ProcessLog {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@Version
	private Long version;

	@Enumerated(EnumType.STRING)
	@Column(length = 20, nullable = false)
	private LogKind logKind;

	@Enumerated(EnumType.STRING)
	@Column(length = 20, nullable = false)
	private ProcessKind processKind;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(nullable = false)
	private Date insertDate;

	@Lob
	private String log;
}
